import React from 'react'
import { useNavigate } from 'react-router-dom'

export default function withMyLink(Component) {
  return function(props){
    const navigate = useNavigate()
    return <Component {...props} history={{navigate}}/>
  }
}
